import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { HttpProvider } from '../../providers/http/http';
import { StorageProvider } from '../../providers/storage/storage';
import { DialogProvider } from '../../providers/dialog/dialog';
/**
 * Generated class for the Resources page.
 *
 * See http://ionicframework.com/docs/components/#navigation for more info
 * on Ionic pages and navigation.
 */
@IonicPage()
@Component({
	selector: 'page-resources',
	templateUrl: 'resources.html',
})
export class ResourcesPage {

	constructor(
		public navCtrl: NavController,
		public navParams: NavParams,
		public http: HttpProvider,
		public storage: StorageProvider,
		public dialog: DialogProvider) {
		
	}

	ionViewDidLoad() {
		console.log('ionViewDidLoad Resources');
	}

	/*待办事务*/
	openresourceslist(type) {
		this.navCtrl.push("ResourceslistPage", { type: type });
	}
	/*查询列表*/
	openresourcestype(type) {
		if(type == 1)
			this.navCtrl.push("ResourcesnowjodPage", { type: 0 });
		if(type == 2)
			this.navCtrl.push("ResourceswaitjodPage", { type: 0 });
		if(type == 3)
			this.navCtrl.push("ResourcesdraftsjodPage", { type: 0 });
		if(type == 4)
			this.navCtrl.push("ResourcesholidayjodPage", { type: 0 });
	}
	/*申请输入页面*/
	openresourcesinput(type) {
		this.navCtrl.push("ResourcesinputPage", { type: type });
	}
}